package com.jddup.test.pojo.mysql;

import com.jddup.common.annotations.ColumnDes;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Time;
import java.util.Arrays;
import java.util.Date;
import java.util.Map;


/**
 * TestFullTypeMysql 实体类
 * by ZZB 2017-12-16 17:16:21
 */
@Table(name = "test_full_type_mysql")
public class TestFullTypeMysql {
    @Id
    @Column( name = "test_primary_key" )
    @ColumnDes( maxLength = 36)
    private String testPrimaryKey;
    @Column( name = "test_bit" )
    private Boolean testBit;
    @Column( name = "test_bit_array" )
    private Boolean testBitArray;
    @Column( name = "test_tinyint" )
    @ColumnDes( maximum = "127")
    private Integer testTinyint;
    @Column( name = "test_tinyint_p" )
    @ColumnDes( maximum = "127" , maxLength = 2)
    private Integer testTinyintP;
//    @Column( name = "test_bool" )
//    private Boolean testBool;
    @Column( name = "test_boolean" )
    private Boolean testBoolean;
    @Column( name = "test_smallint" )
    @ColumnDes( maximum = "32767")
    private Integer testSmallint;
    @Column( name = "test_mediumint" )
    @ColumnDes( maximum = "8388607")
    private Integer testMediumint;
    @Column( name = "test_int" )
    private Integer testInt;
    @Column( name = "test_integer" )
    private Integer testInteger;
    @Column( name = "test_integer_p" )
    private Integer testIntegerP;
    @Column( name = "test_bigint" )
    private Long testBigint;
    @Column( name = "test_int_unsign" )
    private Integer testIntUnsign;
    @Column( name = "test_decimal" )
    @ColumnDes(precision = 10,scale = 0)
    private BigInteger testDecimal;
    @Column( name = "test_decimal_p" )
    @ColumnDes(precision = 20)
    private BigInteger testDecimalP;
    @Column( name = "test_decimal_ps" )
    @ColumnDes(precision = 20,scale = 2)
    private BigDecimal testDecimalPs;
    @Column( name = "test_dec" )
    @ColumnDes(precision = 20,scale = 2)
    private BigDecimal testDec;
    @Column( name = "test_timestamp" )
    @ColumnDes(isNullable = true,defaultValue = " DEFAULT NULL")
    private Date testTimestamp;
    @Column( name = "test_datetime" )
    @ColumnDes(isNullable = true,defaultValue = " DEFAULT NULL")
    private Date testDatetime;
    @ColumnDes(isNullable = true,defaultValue = " DEFAULT NULL")
    @Column( name = "test_time" )
    private Time testTime;
    @Column( name = "test_date" )
    @ColumnDes(isNullable = true,defaultValue = " DEFAULT NULL")
    private java.sql.Date testDate;
    @Column( name = "test_char" )
    @ColumnDes(maxLength = 36)
    private String testChar;
    @Column( name = "test_binary" )
    @ColumnDes(maxLength = 26)
    private Byte[] testBinary;
    @Column( name = "test_varbinary" )
    @ColumnDes(maxLength = 26)
    private Byte[] testVarbinary;
    @Column( name = "test_tinyblob" )
    @ColumnDes(maxLength = 255)
    private Byte[] testTinyblob;
    @Column( name = "test_tinytext" )
    @ColumnDes(maxLength = 255)
    private String testTinytext;
    @Column( name = "test_mediumblob" )
    @ColumnDes(maxLength = 16777215)
    private Byte[] testMediumblob;
    @Column( name = "test_mediumtext" )
    @ColumnDes(maxLength = 16777215)
    private String testMediumtext;
    @Column( name = "test_longblob" )
    @ColumnDes(maxLength = 4294967295L)
    private Byte[] testLongblob;
    @Column( name = "test_longtext" )
    @ColumnDes(maxLength = 4294967295L)
    private String testLongtext;
    @Column( name = "test_blob" )
    @ColumnDes(maxLength = 65535)
    private Byte[] testBlob;
    @Column( name = "test_text" )
    @ColumnDes(maxLength = 65535)
    private String testText;
    private Map<String,Object> testJson;

    /*----------------------get set 方法----------------------*/
    public String getTestPrimaryKey() {return testPrimaryKey;}
    public void setTestPrimaryKey(String testPrimaryKey){this.testPrimaryKey = testPrimaryKey == null ? null : testPrimaryKey.trim();}
    public Boolean getTestBit() {return testBit;}
    public void setTestBit(Boolean testBit){this.testBit = testBit;}
    public Boolean getTestBitArray() {return testBitArray;}
    public void setTestBitArray(Boolean testBitArray){this.testBitArray = testBitArray;}
    public Integer getTestTinyint() {return testTinyint;}
    public void setTestTinyint(Integer testTinyint){this.testTinyint = testTinyint;}
    public Integer getTestTinyintP() {return testTinyintP;}
    public void setTestTinyintP(Integer testTinyintP){this.testTinyintP = testTinyintP;}
//    public Boolean getTestBool() {return testBool;}
//    public void setTestBool(Boolean testBool){this.testBool = testBool;}
    public Boolean getTestBoolean() {return testBoolean;}
    public void setTestBoolean(Boolean testBoolean){this.testBoolean = testBoolean;}
    public Integer getTestSmallint() {return testSmallint;}
    public void setTestSmallint(Integer testSmallint){this.testSmallint = testSmallint;}
    public Integer getTestMediumint() {return testMediumint;}
    public void setTestMediumint(Integer testMediumint){this.testMediumint = testMediumint;}
    public Integer getTestInt() {return testInt;}
    public void setTestInt(Integer testInt){this.testInt = testInt;}
    public Integer getTestInteger() {return testInteger;}
    public void setTestInteger(Integer testInteger){this.testInteger = testInteger;}
    public Integer getTestIntegerP() {return testIntegerP;}
    public void setTestIntegerP(Integer testIntegerP){this.testIntegerP = testIntegerP;}
    public Long getTestBigint() {return testBigint;}
    public void setTestBigint(Long testBigint){this.testBigint = testBigint;}
    public Integer getTestIntUnsign() {return testIntUnsign;}
    public void setTestIntUnsign(Integer testIntUnsign){this.testIntUnsign = testIntUnsign;}
    public BigInteger getTestDecimal() {return testDecimal;}
    public void setTestDecimal(BigInteger testDecimal){this.testDecimal = testDecimal;}
    public BigInteger getTestDecimalP() {return testDecimalP;}
    public void setTestDecimalP(BigInteger testDecimalP){this.testDecimalP = testDecimalP;}
    public BigDecimal getTestDecimalPs() {return testDecimalPs;}
    public void setTestDecimalPs(BigDecimal testDecimalPs){this.testDecimalPs = testDecimalPs;}
    public BigDecimal getTestDec() {return testDec;}
    public void setTestDec(BigDecimal testDec){this.testDec = testDec;}
    public Date getTestTimestamp() {return testTimestamp;}
    public void setTestTimestamp(Date testTimestamp){this.testTimestamp = testTimestamp;}
    public Date getTestDatetime() {return testDatetime;}
    public void setTestDatetime(Date testDatetime){this.testDatetime = testDatetime;}

    public Time getTestTime() {
        return testTime;
    }

    public void setTestTime(Time testTime) {
        this.testTime = testTime;
    }

    public java.sql.Date getTestDate() {
        return testDate;
    }

    public void setTestDate(java.sql.Date testDate) {
        this.testDate = testDate;
    }

    public Map<String, Object> getTestJson() {
        return testJson;
    }

    public void setTestJson(Map<String, Object> testJson) {
        this.testJson = testJson;
    }

    public String getTestChar() {return testChar;}
    public void setTestChar(String testChar){this.testChar = testChar == null ? null : testChar.trim();}
    public Byte[] getTestBinary() {return testBinary;}
    public void setTestBinary(Byte[] testBinary){this.testBinary = testBinary;}
    public Byte[] getTestVarbinary() {return testVarbinary;}
    public void setTestVarbinary(Byte[] testVarbinary){this.testVarbinary = testVarbinary;}
    public Byte[] getTestTinyblob() {return testTinyblob;}
    public void setTestTinyblob(Byte[] testTinyblob){this.testTinyblob = testTinyblob;}
    public String getTestTinytext() {return testTinytext;}
    public void setTestTinytext(String testTinytext){this.testTinytext = testTinytext == null ? null : testTinytext.trim();}
    public Byte[] getTestMediumblob() {return testMediumblob;}
    public void setTestMediumblob(Byte[]  testMediumblob){this.testMediumblob = testMediumblob;}
    public String getTestMediumtext() {return testMediumtext;}
    public void setTestMediumtext(String testMediumtext){this.testMediumtext = testMediumtext == null ? null : testMediumtext.trim();}
    public Byte[]  getTestLongblob() {return testLongblob;}
    public void setTestLongblob(Byte[]  testLongblob){this.testLongblob = testLongblob;}
    public String getTestLongtext() {return testLongtext;}
    public void setTestLongtext(String testLongtext){this.testLongtext = testLongtext == null ? null : testLongtext.trim();}
    public Byte[] getTestBlob() {return testBlob;}
    public void setTestBlob(Byte[] testBlob){this.testBlob = testBlob;}
    public String getTestText() {return testText;}
    public void setTestText(String testText){this.testText = testText == null ? null : testText.trim();}

    @Override
    public String toString() {
        return "TestFullTypeMysql{" +
                "testPrimaryKey='" + testPrimaryKey + '\'' +
                ", testBit=" + testBit +
                ", testBitArray=" + testBitArray +
                ", testTinyint=" + testTinyint +
                ", testTinyintP=" + testTinyintP +
//                ", testBool=" + testBool +
                ", testBoolean=" + testBoolean +
                ", testSmallint=" + testSmallint +
                ", testMediumint=" + testMediumint +
                ", testInt=" + testInt +
                ", testInteger=" + testInteger +
                ", testIntegerP=" + testIntegerP +
                ", testBigint=" + testBigint +
                ", testIntUnsign=" + testIntUnsign +
                ", testDecimal=" + testDecimal +
                ", testDecimalP=" + testDecimalP +
                ", testDecimalPs=" + testDecimalPs +
                ", testDec=" + testDec +
                ", testTimestamp=" + testTimestamp +
                ", testDatetime=" + testDatetime +
                ", testTime=" + testTime +
                ", testDate=" + testDate +
                ", testChar='" + testChar + '\'' +
                ", testBinary=" + Arrays.toString(testBinary) +
                ", testVarbinary=" + Arrays.toString(testVarbinary) +
                ", testTinyblob=" + Arrays.toString(testTinyblob) +
                ", testTinytext='" + testTinytext + '\'' +
                ", testMediumblob=" + Arrays.toString(testMediumblob) +
                ", testMediumtext='" + testMediumtext + '\'' +
                ", testLongblob=" + Arrays.toString(testLongblob) +
                ", testLongtext='" + testLongtext + '\'' +
                ", testBlob=" + Arrays.toString(testBlob) +
                ", testText='" + testText + '\'' +
                ", testJson=" + testJson +
                '}';
    }
}
